package histogram;

import java.util.List;

import data.Data;

public class RatingHistogram {
	
	int[] numRating = new int[5];
	
	public RatingHistogram(List<Data> list){
		for(int i=0; i<5; i++){
			numRating[i]=0;
		}
		for(Data data : list){
			int uid = data.uid;
			short iid = data.iid;
			byte rat = data.rat;
			
			numRating[rat-1]++;
		}
	}

	public int[] getNumRating() {
		return numRating;
	}

}
